/**
 * Copyright 2018 asiainfo Inc.
 **/
package com.myz.rabbitmqspring.spring.producer;

import com.myz.rabbitmqspring.spring.dto.DetailResponse;
import com.myz.rabbitmqspring.spring.dto.MessageWithTime;

/**
 * 消息发送
 *
 * @author maoyz on 2018/8/30
 * @version: v1.0
 */
public interface MessageSender<T> {

    /**
     * 直接发送消息
     *
     * @param message 消息体
     * @return DetailResponse
     */
    DetailResponse send(T message);

    /**
     * 加时间戳的消息体
     *
     * @param messageWithTime
     * @return DetailResponse
     */
    DetailResponse send(MessageWithTime messageWithTime);
}
